module.exports = (options, app) => {

    return async function testMiddleware(ctx, next) {
        if (!ctx.header.csrftoken||ctx.header.csrftoken==="null") {
            ctx.status = 403
            ctx.body = {
                code: 403,
                message:"请先登录"
            }
        } else {
            console.log('auth ok');
            await next();
        }

    };
};